public class MethodTest1 {
    public MethodTest1() {
    }

    public static void main(String[] args) {
        int sum = qiuhe(5);
        System.out.println("和是：" + sum);
    }

    public static int qiuhe(int n) {
        int data = 0;

        for(int i = 1; i <= n; ++i) {
            data += i;
        }

        return data;
    }
}